package com.woniuxy.dao;

import com.woniuxy.controller.dto.RepairMaterialGetDto;
import com.woniuxy.dao.model.RepairMaterial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 维修用料表 Mapper 接口
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
public interface RepairMaterialDao extends BaseMapper<RepairMaterial> {

    @Select("SELECT * from repair_material JOIN housing_material ON " +
            "repair_material.materialCode = housing_material.dictCode " +
            "WHERE repairNum = #{repairnum}")
    List<RepairMaterialGetDto> getRepairMaterial(String repairnum);
}
